package de.measite.smack;

import com.novell.sasl.client.DigestMD5SaslClient;
import com.novell.sasl.client.ExternalSaslClient;
import java.util.Map;
import org.apache.harmony.javax.security.auth.callback.CallbackHandler;
import org.apache.harmony.javax.security.sasl.SaslClient;
import org.apache.harmony.javax.security.sasl.SaslException;
import org.apache.qpid.management.common.sasl.PlainSaslClient;

public class SaslClientFactory
  implements org.apache.harmony.javax.security.sasl.SaslClientFactory
{
  public SaslClient createSaslClient(String[] paramArrayOfString, String paramString1, String paramString2, String paramString3, Map<String, ?> paramMap, CallbackHandler paramCallbackHandler)
    throws SaslException
  {
    for (String str : paramArrayOfString)
    {
      if ("PLAIN".equals(str))
        return new PlainSaslClient(paramString1, paramCallbackHandler);
      if ("DIGEST-MD5".equals(str))
        return DigestMD5SaslClient.getClient(paramString1, paramString2, paramString3, paramMap, paramCallbackHandler);
      if ("EXTERNAL".equals(str))
        return ExternalSaslClient.getClient(paramString1, paramString2, paramString3, paramMap, paramCallbackHandler);
    }
    return null;
  }

  public String[] getMechanismNames(Map<String, ?> paramMap)
  {
    return new String[] { "PLAIN", "DIGEST-MD5", "EXTERNAL" };
  }
}

/* Location:           D:\hygieia\userclient\common\libs\easemobchat_2.1.8.jar
 * Qualified Name:     de.measite.smack.SaslClientFactory
 * JD-Core Version:    0.6.1
 */